package com.acoreful.bootsample.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction;
import org.springframework.stereotype.Service;

import com.acoreful.bootsample.dao.entity.Book;
import com.acoreful.bootsample.dao.repo.BookRepository;

@Service
public class BookService {
	@Autowired
	private BookRepository bookRepo;

	public List<Book> findList() {
		return bookRepo.findAll(new Sort(Direction.ASC, "id"));
	}

}
